{% if item.active == 1 %}
        <div class="hidden variable-config"
             data-id="{% if form %}{{ form.web_id }}-{% endif %}{{ item.web_id }}-{{ uuid }}"
             data-name="{{ item.name }}"
             data-key="{{ item.key }}"
             data-device-id={{var.device_id}}
             data-color="{{ item.variable.chart_line_color.color_code }}"
             data-init-type="0"
             data-type="{{ item.item_type}}"
             data-min="{{ item.min }}"
             data-max="{{ item.max }}"
             data-value-class="{{ item.value_class }}"
             data-min-type="{{ item.min_type }}"
             data-max-type="{{ item.max_type }}"
             data-unit="{% if item.unit %}{{ item.unit }}{% endif %}"
             data-device-polling_interval="{{ item.device.polling_interval }}"
             data-value-timestamp=""
             data-refresh-requested-timestamp=""
             data-dictionary="{{ item.dictionary.dict_as_json }}"
        {% if item.display_value_options %}
             data-color-type="{{ item.display_value_options.color_type }}"
             data-color-mode="{{ item.display_value_options.mode }}"
             data-level-1-type="{{ item.display_value_options.color_level_1_type }}"
             data-level-2-type="{{ item.display_value_options.color_level_2_type }}"
             data-level-1="{{ item.display_value_options.color_level_1 }}"
             data-level-2="{{ item.display_value_options.color_level_2 }}"
             data-color-1="{{ item.display_value_options.color_1 }}"
             data-color-2="{{ item.display_value_options.color_2 }}"
             data-color-3="{{ item.display_value_options.color_3 }}"
             data-timestamp-conversion="{{ item.display_value_options.timestamp_conversion }}"
         {% endif %}
        ></div>
    {% if item.type == 0 %}<!-- control element -->
        {% if item.value_class == 'BOOL' or item.value_class == 'BOOLEAN' %}
            <!-- input button -->
            {% include "button.html" %}
        {% elif item.control_element_options.dropdown and item.dictionary %}<!-- dropdown -->
            {% include "dropdown.html" with last_value=item.value %}
        {% else %}
            <!-- input field -->
            {% include "value_field.html" %}
        {% endif %}
    {% elif item.type == 1 %}<!-- display value -->
        {% if not item.display_value_options %}
            <!-- No display options -->
            <!-- Value only -->
            {% if item.value_class == 'BOOL' or item.value_class == 'BOOLEAN' %}
                <!-- boolean display -->
                {% include "button.html" %}
            {% else %}
                {% include "value_field.html" %}
            {% endif %}
        {% else %}
            <!-- Display options -->
            {% if item.display_value_options.type == 0 %}
                <!-- Classic Div -->
                {% if item.value_class == 'BOOL' or item.value_class == 'BOOLEAN' or item.display_value_options.color_only == 1 %}
                    <!-- boolean display -->
                    {% include "button.html" %}
                {% else %}
                    {% include "value_field.html" %}
                {% endif %}
            {% elif item.display_value_options.type == 3 %}
                <!-- Gauge -->
                {% include "gauge.html" with gauge=item %}
            {% endif %}
        {% endif %}
    {% else %}
        <!-- else 3 -->
        Control item type is wrong : {{ item.type }} !
    {% endif %}
{% endif %}
